<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8" />
    <title>主页</title>
    <link rel="stylesheet" href="../../layuimini/lib/layui-v2.5.5/css/layui.css" media="all" />
    <link rel="stylesheet" href="../../layuimini/css/public.css" media="all" />
    <link rel="stylesheet" href="../../layuimini/lib/font-awesome-4.7.0/css/font-awesome.css" media="all" />

    <style>
        .welcome .layui-card {
            border: 1px solid #f2f2f2;
            border-radius: 5px;
        }

        .welcome .icon {
            margin-right: 10px;
            color: #1aa094;
        }

        .welcome .icon-cray {
            color: #ffb800 !important;
        }

        .welcome .icon-blue {
            color: #1e9fff !important;
        }

        .welcome .icon-tip {
            color: #ff5722 !important;
        }

        .welcome .layuimini-qiuck-module {
            text-align: center;
            margin-top: 10px
        }

        .welcome .layuimini-qiuck-module a i {
            display: inline-block;
            width: 100%;
            height: 60px;
            line-height: 60px;
            text-align: center;
            border-radius: 2px;
            font-size: 30px;
            background-color: #F8F8F8;
            color: #333;
            transition: all .3s;
            -webkit-transition: all .3s;
        }

        .welcome .layuimini-qiuck-module a cite {
            position: relative;
            top: 2px;
            display: block;
            color: #666;
            text-overflow: ellipsis;
            overflow: hidden;
            white-space: nowrap;
            font-size: 14px;
        }

        .welcome .welcome-module {
            width: 100%;
            height: 210px;
        }

        .welcome .panel {
            background-color: #fff;
            border: 1px solid transparent;
            border-radius: 3px;
            -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, .05);
            box-shadow: 0 1px 1px rgba(0, 0, 0, .05)
        }

        .welcome .panel-body {
            padding: 10px
        }

        .welcome .panel-title {
            margin-top: 0;
            margin-bottom: 0;
            font-size: 12px;
            color: inherit
        }

        .welcome .label {
            display: inline;
            padding: .2em .6em .3em;
            font-size: 75%;
            font-weight: 700;
            line-height: 1;
            color: #fff;
            text-align: center;
            white-space: nowrap;
            vertical-align: baseline;
            border-radius: .25em;
            margin-top: .3em;
        }

        .welcome .layui-red {
            color: red
        }

        .welcome .main_btn>p {
            height: 40px;
        }

        .welcome .layui-bg-number {
            background-color: #F8F8F8;
        }

        .welcome .layuimini-notice:hover {
            background: #f6f6f6;
        }

        .welcome .layuimini-notice {
            padding: 7px 16px;
            clear: both;
            font-size: 12px !important;
            cursor: pointer;
            position: relative;
            transition: background 0.2s ease-in-out;
        }

        .welcome .layuimini-notice-title,
        .layuimini-notice-label {
            padding-right: 70px !important;
            text-overflow: ellipsis !important;
            overflow: hidden !important;
            white-space: nowrap !important;
        }

        .welcome .layuimini-notice-title {
            line-height: 28px;
            font-size: 14px;
        }

        .welcome .layuimini-notice-extra {
            position: absolute;
            top: 50%;
            margin-top: -8px;
            right: 16px;
            display: inline-block;
            height: 16px;
            color: #999;
        }
    </style>
</head>

<body>
    <div class="layuimini-container layuimini-page-anim">
        <div class="layuimini-main welcome">
            <div class="layui-row layui-col-space15">
                <div class="layui-col-md12">
                    <div class="layui-row layui-col-space15">
                        <div class="layui-col-md12">
                            <div class="layui-card">
                                <div class="layui-card-header"><i class="fa fa-warning icon"></i>欢迎回来</div>
                                <div class="layui-card-body">
                                    <div class="welcome-module">
                                        <div class="layui-row layui-col-space10">
                                            <div class="layui-col-md3">
                                                <div class="panel layui-bg-number">
                                                    <div class="panel-body">
                                                        <div class="panel-title">
                                                            <h5>员工ID</h5>
                                                        </div>
                                                        <div class="panel-content">
                                                            <h1 class="no-margins" id="personalId"></h1>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="layui-col-md3">
                                                <div class="panel layui-bg-number">
                                                    <div class="panel-body">
                                                        <div class="panel-title">
                                                            <h5>姓名</h5>
                                                        </div>
                                                        <div class="panel-content">
                                                            <h1 class="no-margins" id="name"></h1>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="layui-col-md3">
                                                <div class="panel layui-bg-number">
                                                    <div class="panel-body">
                                                        <div class="panel-title">
                                                            <h5>部门</h5>
                                                        </div>
                                                        <div class="panel-content">
                                                            <h1 class="no-margins" id="department"></h1>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="layui-col-md3">
                                                <div class="panel layui-bg-number">
                                                    <div class="panel-body">
                                                        <div class="panel-title">
                                                            <h5>岗位</h5>
                                                        </div>
                                                        <div class="panel-content">
                                                            <h1 class="no-margins" id="position"></h1>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <script src="../../layuimini/lib/layui-v2.5.5/layui.js" charset="utf-8"></script>

    <script src="../../layuimini/js/lay-config.js"></script>
    <script>
        layui.use(['axios', 'common', 'jquery'], function () {
            var common = layui.common
            var $ = layui.jquery
            common.axios('/personal/getSolo', 'get', null, function (res) {
                let user_info = res.data.data
                console.log(user_info)
                $('#personalId').text(user_info.id)
                $('#name').text(user_info.name)
                $('#department').text(user_info.departmentName)
                $('#position').text(user_info.positionName)

            })
            // common.axios('/personal', 'get', null, function (res) {

            // })
        })
    </script>
</body>

</html>